<template>
    <div class="title">关于我们</div>
    {{ newsDetail.title }}
    {{ newsDetail.create_time }}
    <div class="py-4" v-html="newsDetail.content"></div>
</template>

<script lang="ts" setup>
import { getArticleDetail } from "@/api/news";
import { reactive } from "vue";

const newsDetail = reactive({
    title: "",
    create_time: "",
    content: ""
});

const getNewsDetail = async (id: number) => {
    let res = await getArticleDetail({ id: id });
    newsDetail.title = res.data.title;
    newsDetail.create_time = res.data.create_time;
    newsDetail.content = res.data.content;
}

getNewsDetail(633);

</script>
<style scoped lang="scss">
.title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
}
</style>